#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QToolBox>
#include <QHBoxLayout>
#include <QVBoxLayout>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QVBoxLayout* vl = new QVBoxLayout(this);
    QToolBox* tb = new QToolBox(this);
    vl->addWidget(tb);

    QWidget* page1 = new QWidget(tb);
    QVBoxLayout* layout1 = new QVBoxLayout(page1);
    QPushButton *pb1 = new QPushButton("大话西游", page1);
    QPushButton *pb2 = new QPushButton("功夫", page1);
    QPushButton *pb3 = new QPushButton("整蛊专家", page1);
    layout1->addWidget(pb1);
    layout1->addWidget(pb2);
    layout1->addWidget(pb3);
    tb->addItem(page1,"周星驰");

    QWidget* page2 = new QWidget(tb);
    QVBoxLayout* layout2 = new QVBoxLayout(page2);
    QPushButton *pb4 = new QPushButton("无间道", page2);
    QPushButton *pb5 = new QPushButton("拆弹专家", page2);
    layout2->addWidget(pb4);
    layout2->addWidget(pb5);
    tb->addItem(page2,"刘德华");




}

Widget::~Widget()
{
    delete ui;
}
